<extend name="Level/level" />

<block name="main">
	 <div class="panel panel-primary">
        <div class="panel-heading zt" style="text-align:center;">{$title}</div>
            <div class="panel-body">
            	<form role="form" action="{:U('update',array('id'=>$data[id]))}" enctype="multipart/form-data" method="post">
				  <div class="form-group">
				    <label for="exampleInputEmail1">积分:</label>
				    <input class="btn btn-default" type="text" placeholder="0" name="socre1" value="{$data.socre1}">
				    <input class="btn btn-default" type="text" placeholder="100" name="socre2" value="{$data.socre2}">
				  </div>
				  <div class="form-group">
				    <label for="exampleInputPassword1">等级</label>
				    <input type="text" class="form-control" id="exampleInputPassword1" placeholder="等级" name="level" value="{$data.level}">
				  </div>
				  <div class="form-group">
				    <label for="exampleInputFile">等级图片</label>
					    <div id="original" style="display:block;">
						    <img src="__PUBLIC__/uploads/{$data.img}" width="60px" height="60px">
						    <input type="button" id="btn" value="修改图片">
					    </div>
				    	<input type="file" id="exampleInputFile" name="img" style="display:none;">
				  </div>
				  <button type="submit" class="btn btn-default">提交</button>
				</form>
            </div>
        </div>
    </div>
    <script>
		$(function(){
			$('#btn').click(function(){
				$('#original').css('display','none');
				$('#exampleInputFile').css('display','block');
			})
		})
	</script>
</block>